package cn.mw.cmdb.entity;

import cn.mw.cmdb.enums.TableViewTypeEnum;
import cn.mw.microMonitorCommon.api.cmdb.TableIdEnum;
import cn.mw.microMonitorCommon.api.cmdb.TreeView;

import java.util.List;

public class OrgTreeView implements TreeView {
    private static final String emptyId = "0";
    private String id;
    private String orgName;

    private String parentId;

    private int count;

    private String itemAssetsStatus;

    private List<String> childStatus;

    public OrgTreeView(String id, String parentId, String orgName) {
        this.id = id;
        if (null != parentId && !emptyId.equals(parentId)) {
            this.parentId = parentId;
        }
        this.orgName = orgName;
    }

    @Override
    public Object getId() {
        return id;
    }

    @Override
    public Object getParentId() {
        return parentId;
    }

    @Override
    public String getItemName() {
        return orgName;
    }

    @Override
    public String getType() {
        return TableIdEnum.org.name();
    }

    @Override
    public String getViewType() {
        return TableViewTypeEnum.list.getCode();
    }

    @Override
    public String getItemAssetsStatus() {
        return this.itemAssetsStatus;
    }

    @Override
    public void setItemAssetsStatus(String itemAssetsStatus) {
        this.itemAssetsStatus = itemAssetsStatus;
    }

    @Override
    public int getCount() {
        return count;
    }

    @Override
    public void setCount(int count) {
        this.count = count;
    }

    @Override
    public List<String> getChildStatus() {
        return this.childStatus;
    }

    @Override
    public void setChildStatus(List<String> status) {
        this.childStatus = status;
    }
}
